<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>网点查询</title>
		<link href="../../css/mui.min.css" rel="stylesheet" />
		<link href="../../css/main.css" rel="stylesheet" />
	</head>
	<style type="text/css">

	</style>

	<body>
		<div class="container">
			<div id="container" class="map"></div>
			<div class="bar_menu_search">
				<div class="bar_menu_search_content">
					<span class="icon_search f_left"></span>
					<input id="search_adress" type="text" placeholder="搜索地点" />
					<span class="icon_voice m_left_02"></span>
					<div class="div_line1">|</div>
					<span id="btn_menu" class="icon_left_menu"></span>
				</div>
			</div>

			<div class="bar_info_marquee">
				<div id="bottom_content" class="bar_info_marquee_content">
					<span class="icon_waring"></span>
					<span class="font_13 font_color_hui text_waring">提醒</span>
					<div class="div_line_vertical">|</div>
					<marquee class="text_marquee" align="absmiddle" behavior="scroll" bgcolor="#fff" direction="left" width="67%" loop="-1" scrollamount="5" scrolldelay="1">
						<p class="font_color_blue font_14">4月17日 北京市昌平区南关橙色大风提醒</p>
					</marquee>
				</div>
			</div>
			<div id="list_details" class="list_details_div">
				<ul id="weather_list_details" class="list_style padding_0">
					<!--<li id="weather_list_select1" onclick="select_weather_info(this.id)"  class="font_14 font_color_red white">
						<span class="icon_left_h_4"></span><span>4月17日 北京市昌平区南关橙色大风提醒</span><span class="icon_right"></span>
					</li>   
					<div class="div_line"></div>     -->
				</ul>
			</div>

			<div id="week_list_details" class="week_list_details">
				<ul class="list_style">
					<li class="list_wether_li background_color_bule">
						<div id="" class="list_wether_div background_color_orange">
							<span class="list_wether_span">昨天</span><br>
							<span class="list_wether_span padding_06">3/16</span><br>
							<span class="list_wether_span padding_06">晴</span><br>
							<span class="main_icon weather_0"></span><br>
							<span class="list_wether_span">10~18°</span><br>
							<span class="list_wether_span padding_06">东风</span><br>
							<span class="list_wether_span padding_06">2级</span><br>
						</div>
						<div id="" class="list_wether_div">
							<span class="list_wether_span">昨天</span><br>
							<span class="list_wether_span padding_06">3/16</span><br>
							<span class="list_wether_span padding_06">晴</span><br>
							<span class="main_icon weather_0_0"></span><br>
							<span class="list_wether_span">10~18°</span><br>
							<span class="list_wether_span padding_06">东风</span><br>
							<span class="list_wether_span padding_06">2级</span><br>
						</div> 
						<div id="" class="list_wether_div">
							<span class="list_wether_span">昨天</span><br>
							<span class="list_wether_span padding_06">3/16</span><br>
							<span class="list_wether_span padding_06">晴</span><br>
							<span class="main_icon weather_12"></span><br>
							<span class="list_wether_span">10~18°</span><br>
							<span class="list_wether_span padding_06">东风</span><br>
							<span class="list_wether_span padding_06">2级</span><br>
						</div>
						<div id="" class="list_wether_div">
							<span class="list_wether_span">昨天</span><br>
							<span class="list_wether_span padding_06">3/16</span><br>
							<span class="list_wether_span padding_06">晴</span><br>
							<span class="main_icon weather_13"></span><br>
							<span class="list_wether_span">10~18°</span><br>
							<span class="list_wether_span padding_06">东风</span><br>
							<span class="list_wether_span padding_06">2级</span><br>
						</div>
						<div id="" class="list_wether_div">
							<span class="list_wether_span">昨天</span><br>
							<span class="list_wether_span padding_06">3/16</span><br>
							<span class="list_wether_span padding_06">晴</span><br>
							<span class="main_icon weather_0_0"></span><br>
							<span class="list_wether_span">10~18°</span><br>
							<span class="list_wether_span padding_06">东风</span><br>
							<span class="list_wether_span padding_06">2级</span><br>
						</div>
						<div id="" class="list_wether_div">
							<span class="list_wether_span">昨天</span><br>
							<span class="list_wether_span padding_06">3/16</span><br>
							<span class="list_wether_span padding_06">晴</span><br>
							<span class="main_icon weather_0_0"></span><br>
							<span class="list_wether_span">10~18°</span><br>
							<span class="list_wether_span padding_06">东风</span><br>
							<span class="list_wether_span padding_06">2级</span><br>
						</div>
					</li>
				</ul>
			</div>
		</div>
		<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=unhssyPbfPtuqM9qUqV52Gy5vBNc6wK7"></script>
		<script type="text/javascript" src="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.js"></script>
		<script src="../../js/common/jquery-1.12.0.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/common/mui.min.js"></script>
		<script src="../../js/common/sea.js"></script>
		<script>
			var main, menu, mask = mui.createMask(_closeMenu);
			var showMenu = false,
				mode = 'main-move';

			mui.init({
				swipeBack: false,
				beforeback: back
			});

			function back() {
				if(showMenu) {
					//菜单处于显示状态，返回键应该先关闭菜单,阻止主窗口执行mui.back逻辑；
					closeMenu();
					return false;
				} else {
					//菜单处于隐藏状态，执行返回时，要先close菜单页面，然后继续执行mui.back逻辑关闭主窗口；
					menu.close('none');
					return true;
				}
			}
			//plusReady事件后，自动创建menu窗口；
			mui.plusReady(function() {
				main = plus.webview.currentWebview();
				//setTimeout的目的是等待窗体动画结束后，再执行create webview操作，避免资源竞争，导致窗口动画不流畅；
				setTimeout(function() {
					menu = mui.preload({
						id: 'baiduLeftMenu',
						url: 'baiduLeftMenu.html',
						styles: {
							left: "30%",
							width: '70%',
							zindex: 9997
						}
					});
				}, 300);
			});

			/*
			 * 显示菜单菜单
			 */
			function openMenu() {
				if(!showMenu) {
					//解决android 4.4以下版本webview移动时，导致fixed定位元素错乱的bug;
					if(mui.os.android && parseFloat(mui.os.version) < 4.4) {
						document.querySelector("header.mui-bar").style.position = "static";
						//同时需要修改以下.mui-contnt的padding-top，否则会多出空白；
						document.querySelector(".mui-bar-nav~.mui-content").style.paddingTop = "0px";
					}

					//侧滑菜单处于隐藏状态，则立即显示出来；
					//显示完毕后，根据不同动画效果移动窗体；
					menu.show('none', 0, function() {
						menu.setStyle({
							left: '30%',
							transition: {
								duration: 150
							}
						});
						//							break;
					});
					//显示主窗体遮罩
					mask.show();
					showMenu = true;
				}
			}

			function closeMenu() {
				//窗体移动
				_closeMenu();
				//关闭遮罩
				mask.close();
			}

			/**
			 * 关闭侧滑菜单(业务部分)
			 */
			function _closeMenu() {
				if(showMenu) {
					//解决android 4.4以下版本webview移动时，导致fixed定位元素错乱的bug;
					if(mui.os.android && parseFloat(mui.os.version) < 4.4) {
//						document.querySelector("header.mui-bar").style.position = "fixed";
						//同时需要修改以下.mui-contnt的padding-top，否则会多出空白；
//						document.querySelector(".mui-bar-nav~.mui-content").style.paddingTop = "44px";
					}
					//主窗体开始侧滑；
					menu.setStyle({
						left: '100%',
						transition: {
							duration: 150
						}
					});
					//等窗体动画结束后，隐藏菜单webview，节省资源；
					setTimeout(function() {
						menu.hide();
					}, 300);
					showMenu = false;
				}
			}

			//变换侧滑动画移动效果；
			mui('#btn_menu').on('change', function() {
				alert()
				menu.setStyle({
					left: '100%',
					zindex: 9999
				});
				mode = 'menu-move';
			});

			document.getElementById("btn_menu").addEventListener('tap', openMenu);
			//在android4.4中的swipe事件，需要preventDefault一下，否则触发不正常
			//故，在dragleft，dragright中preventDefault
			window.addEventListener('dragright', function(e) {
				e.detail.gesture.preventDefault();
			});
			window.addEventListener('dragleft', function(e) {
				e.detail.gesture.preventDefault();
			});
			//主界面向左滑动，若菜单未显示，则显示菜单；否则不做任何操作；
			window.addEventListener("swipeleft", openMenu);
			//主界面向右滑动，若菜单已显示，则关闭菜单；否则，不做任何操作；
			window.addEventListener("swiperight", closeMenu);
			//menu页面向右滑动，关闭菜单；
			window.addEventListener("menu:swiperight", closeMenu);

			//重写mui.menu方法，Android版本menu按键按下可自动打开、关闭侧滑菜单；
			mui.menu = function() {
				if(showMenu) {
					closeMenu();
				} else {
					openMenu();
				}
			}
		</script>

		<script type="text/javascript">
			seajs.config({
				base: "../../js/controllers/"
			});
			seajs.use('maps/map_baidu');
		</script>
	</body>

</html>